#pragma once
#include "canitf.h"
namespace rtbus {
class SCan : public CANItf
{
public:
    SCan();
    ~SCan();
    virtual int load_cfg(Config& cfg) override;
    virtual int active() override;
    virtual int deactive() override;
    virtual int send(FrameData* frame, size_t cnt) override;
    virtual int recv(FrameData* frame, size_t cnt) override;
    inline CANType type() { return CANType::SOCKETCAN; }

private:
    Config cfg_;
    int fd_;
    bool is_actived_;
};
}  // namespace rtbus
